<head>
    <title>Beego</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
     
  
  </head>
  <style>
    input {
      margin-top: 5px;
      border-radius: 2px;
    }
  
    form {
      border-radius: 10px;
    }
  
    form>input {
      border: none;
    }
  
    .button {
      background-color: green;
      padding: 5px;
      border: none;
    }
  </style>
  
  <body style="background-image: linear-gradient(to top, #dbdcd7 0%, #dddcd7 24%, #e2c9cc 30%, #e7627d 46%, #b8235a 59%, #801357 71%, #3d1635 84%, #1c1a27 100%);">
    <header>
      <h1 class="logo">注册页面</h1>
      {{.Website}}
    </header>
     
    <div class="backdrop"></div>
   
    <form style="background-image: linear-gradient(to top, #4fb576 0%, #44c489 30%, #28a9ae 46%, #28a2b7 59%, #4c7788 71%, #6c4f63 86%, #432c39 100%);
       height: 250px; width: 250px; color: white; text-align:center;
      margin: 0 auto; padding: 5px;">
      <h3> 新用户注册</h3>
      <label for="sn">学号:</label>
      <input type="text" name="" value="" id="sn">
      <br>
      <label for="pswd">密码:</label>
      <input type="password" name="" value="" id="pswd">
      <br>
      <label for="sn">性别:</label>
      <input type="text" name="" value="" id="sex">
      <br>
      <label for="sn">姓名:</label>
      <input type="text" name="" value="" id="name">
      <br>
      <label for="sn">电话:</label>
      <input type="text" name="" value="" id="tel">
      <br>
      <label for="sn">邮件:</label>
      <input type="text" name="" value="" id="email">
      <br>
      <label for="sn">备注:</label>
      <input type="text" name="" value="" id="comments">
      <br>
  
      <input onclick="register()" value="确定注册" class="button" type="button"></input>
      <br>
    </form>
  
  </body>
  <script>
  
    function register() {
      var userinfo = new Object();
      userinfo.Sn = document.getElementById("sn").value;
      userinfo.Pswd = document.getElementById("pswd").value;
      userinfo.Name = document.getElementById("name").value;
      userinfo.Sex = document.getElementById("sex").value;
      userinfo.Tel = document.getElementById("tel").value;
      userinfo.Email = document.getElementById("email").value;
      userinfo.Comments = document.getElementById("comments").value;
  
      fetch("/doRegister", {
        method: "post",
        body: JSON.stringify(userinfo)
      }).then(
        alert("注册成功")
      )
    }
  
  
  
  
  </script>